GXGetTagStructure
You can use theGXGetTagStructure
function to get a pointer to the contents of a tag object.
void *GXGetTagStructure(gxTag source, long *length);
source
- A reference to the tag object whose contents you need access to.
length
- A pointer to a value. On return, contains the size in bytes of the contents of the tag object referenced in the
source
parameter.- function result
- A pointer to the contents of the source tag object.
DESCRIPTION
TheGXGetTagStructure
function returns a pointer to the contents of the tag object referenced in thesource
parameter. To directly edit a tag's contents, you must first callGXLockTag
. You can then callGXGetTagStructure
and edit the tag's contents. After editing, you must callGXUnlockTag
.The
GXGetTagStructure
function is different from theGXGetTag
function in that it gives you direct access to the contents of a tag object in QuickDraw GX memory. TheGXGetTag
function returns a copy of the tag object's contents in a buffer that you have allocated in application memory.To edit the contents of a tag object, you need to know its format and organization.
GXGetTagStructure
returns a pointer and a size only; it does not provide you with any information about the internal structure of the tag's contents.This function does not provide access to tag type information.
SPECIAL CONSIDERATIONS
Note that using theGXGetTagStructure
is different from callingGXSetTag
, in that it does not allow you to change the size of the tag object.This function is available for your convenience, in that you do not have to make a copy of the tag object's data, but is rarely needed. In most cases you can use the
GXGetTag
andGXSetTag
functions to manipulate tag contents.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory tag_is_nil Notices (debugging version) lockTag_called_as_side_effect SEE ALSO
TheGXLockTag
function is described on page 8-21. TheGXUnlockTag
function is described in the previous section.The
GXGetTag
function is described on page 8-18. TheGXSetTag
function is described on page 8-19.